/*
 *    Copyright (c) 2018-2025, lengleng All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: lengleng (wangiegie@gmail.com)
 */

package com.pig4cloud.pigx.strategy.bo;


import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;

import java.math.BigDecimal;

/**
 * 策略止盈止损-合约
 *
 * @since 2023/2/7 18:21
 */
@Data
public class StrategyStopOrderContractCacheBO extends Model<StrategyStopOrderContractCacheBO> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    private Long id;

    /**
     * 外部平台id
     */
    private Long externalId;

    /**
     * 平台id
     */
    private Long platformId;

    /**
     * 任务id
     */
    private Long taskId;

    /**
     * 用户id
     */
    private Long userId;

    /**
     * 仓位id
     */
    private Long positionId;

    /**
     * 币对名称
     */
    private String symbolName;

    /**
     * 产品名称
     */
    private String productName;

    /**
     * 方向（0做多、1做空）
     */
    private String side;

    /**
     * 数量
     */
    private Integer num;

    /**
     * 单向/双向（0单向、1双向）
     */
    private String sideType;

    /**
     * 是否止盈（0否、1是）
     */
    private String hasStopProfit;

    /**
     * 止盈触发价格，是否止盈为是时不能为空
     */
    private BigDecimal stopProfitTrigger;

    /**
     * 止盈价格类型（0市价、1限价），是否止盈为是时不能为空
     */
    private String stopProfitType;

    /**
     * 止盈价格，止盈价格类型为限价时不能为空
     */
    private BigDecimal stopProfitPrice;

    /**
     * 止盈价格类型（0最新价格、1指数价格、2标记价格）
     */
    private String stopProfitPriceType;

    /**
     * 是否止损（0否、1是）
     */
    private String hasStopLost;

    /**
     * 止损触发价格，是否止损为是时不能为空
     */
    private BigDecimal stopLostTrigger;

    /**
     * 止损价格类型（0市价、1限价），是否止损为是时不能为空
     */
    private String stopLostType;

    /**
     * 止损价格，止损价格类型为限价时不能为空
     */
    private BigDecimal stopLostPrice;

    /**
     * 止损价格类型（0最新价格、1指数价格、2标记价格）
     */
    private String stopLostPriceType;

    /**
     * 同步状态（0未同步、1同步中、2同步成功）
     */
    private String syncStatus;

    /**
     * 最大价格
     */
    private BigDecimal maxPrice;

    /**
     * 最小价格
     */
    private BigDecimal minPrice;
}
